var sz_WeChatCambioLogin = {
    execute: function () {
        if (sz_ConstantsService.isLogin() != true) {
            sz_WeChatCambioLogin.toLogin();
        }
    },
    toLogin: function () {
        try {
            //正常工作
            var b = new sz_Base64();
            var uri = sz_LoginService.formatShareUserUri(window.location.href);
            var targetURL = b.encode(uri);
            var params = {
                targetURL: targetURL,
                scope: 'snsapi_userinfo'
            };
            $.ajax({
                type: "POST",
                url: $sz_Config.webLoginURL,
                contentType: "application/json", //必须有
                dataType: "json", //表示返回值类型，不必须
                data: JSON.stringify(params),  //相当于 //data: "{'str1':'foovalue', 'str2':'barvalue'}",
                success: function (result) {
                    if (result && result.value && result.value.length > 10) {
                        //alert(result.value);
                        location.href = result.value;
                    } else {
                        alert("ajax请求登录的URL有错误内容是空" + JSON.stringify(result));
                    }
                }
            });
        } catch (e) {
            console.log(e);
        }
    }
}